// 业务模块的api
import axios from '@/utils/request'

// 分页查询变量列表
export function getDocumentVariableList(data) {
  return axios({
    method: 'get',
    url: '/editor/documentVariable/page',
    params: data
  })
}
// 新增变量
export function addDocumentVariable(data) {
    return axios({
        method: 'post',
        url: '/editor/documentVariable',
        data
    })
}
// 修改变量
export function editDocumentVariable(data) {
    return axios({
        method: 'put',
        url: '/editor/documentVariable',
        data
    })
}
// 删除变量
export function deleteDocumentVariable(ids) {
    return axios({
        method: 'delete',
        url: `/editor/documentVariable/${ids}`
    })
}
// 获取变量类型列表
export function getVariableTypeList() {
    return axios({
        method: 'get',
        url: `/editor/documentVariable/listVariableType`
    })
}
// 加载存储的变量内容
export function loadContent(params) {
    return axios({
        method: 'get',
        url: `/editor/documentVariable/loadContent`,
        params
    })
}
// 动态查询变量内容
export function queryContent(params) {
    return axios({
        method: 'get',
        url: `/editor/documentVariable/queryContent`,
        params
    })
}
// 存储变量内容
export function saveContent(data) {
    return axios({
        method: 'post',
        url: `/editor/documentVariable/saveContent`,
        data
    })
}